package edu.depaul.se.courseregistration.mdb.pubsub;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Caller the publisher to publish course updates message.
 * The course update events now include the course section open and close.
 * 
 * @author xchen
 */
public class RemindCourseUpdate {
    public static void publishTopic(String msg){
        CourseUpdateTopicPublisher pub = new CourseUpdateTopicPublisher();
        
         DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
         Date date = new Date();
        pub.sendMessage(dateFormat.format(date) + "\n" + msg);
    }
}
